#! /bin/sh
# build velocity profiles with unif2

modelfile=syncline.unif2
velfile=syncline.bin
n1=200
n2=400
d1=10
d2=10

unif2 <$modelfile method=$i ninf=2 nx=$n2 nz=$n1 v00=2000,4000 \
ninf=1 method=spline  > $velfile

ximage < $velfile  wbox=400 hbox=200 n1=$n1 n2=$n2 d1=$d1 d2=$d2 \
 wbox=800 hbox=400  legend=1 title="Syncline model" label1="depth m" \
label2="distance m " units="m/s" &

# do finite difference modeling
xs=1500 zs=10 hsz=10 vsx=1000 verbose=2
vsfile="vseis.out" ssfile="sseis.out" hsfile="hseis.out"
tmax=2.0 mt=10 
label1="Depth m"
label2="Distance m"

sufdmod2 < $velfile nz=$n1 dz=$d1 nx=$n2 dx=$d2 verbose=1 \
	xs=$xs zs=$zs hsz=$hsz vsx=$vsx hsfile=$hsfile \
	vsfile=$vsfile ssfile=$ssfile verbose=$verbose \
	tmax=$tmax abs=1,1,1,1 mt=$mt |
suxmovie  clip=1.0 \
	title="Acoustic Finite-Differencing" \
	windowtitle="Movie" \
	label1=$label1 label2=$label2 \
	n1=$n1 d1=$d1 f1=$f1 n2=$n2 d2=$d2 f2=$f2 \
	loop=1 sleep=10000  -geometry 800x400 &

exit 0
